package chapter22.homework02;

import java.util.ArrayList;
import java.util.List;
import java.util.Observer;

public abstract class ManageSubject {

    //用来保存本系的观察者对象
    private List<Observer> observers = new ArrayList<Observer>();

    //把老师或学生加入到本系中
    public void attch(Observer observer){
        observers.add(observer);
    }

    //删除本系的老师或学生
    public void detach(Observer observer){
        observers.remove(observer);
    }

    //通知本系的所有人系名
    public void notifyObservers(){

    }
}